package com.atguigu.gulimall.order.feign.fallback;

import com.atguigu.common.exception.BizCodeEnum;
import com.atguigu.common.utils.R;
import com.atguigu.gulimall.order.feign.MemberFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @create: 2024/9/11
 * @author: gyhe10
 * @description:
 **/
@Slf4j
@Component
public class MemberFeignServiceFallback implements MemberFeignService {
    @Override
    public R getAddresses(Long memberId) {
        log.error("远程调用 member 服务查询用户收货地址列表失败，涉及会员 ID：{}", memberId);
        return R.error(BizCodeEnum.CALL_OTHER_SERVICE_EXCEPTION.getCode(), "远程调用 member 服务查询用户收货地址列表失败，涉及会员 ID：" + memberId);
    }
}
